<?php
namespace Home\Controller;

use Think\Controller;

class DesktopController extends Controller {


    public function index(){


        $nav_bar_menu = array();
        foreach (C('setting_menu_default') as $key=>$value) {

            if ($value['use'] != '1' ) continue;

            //判断是否为当前窗口
            //$value['has'] = ST == $value['name'] ? 'this' : '';

            if ($value['type'] == 'system') {
                $value['text'] = L('ui_'.$value['name']);
            }else{
                $value['text'] = $value['name'];
            }

            $nav_bar_menu[] = $value;
        }
        //
        $nav_bar_menu[0]['has'] = 'this';
        $this->assign('nav_bar_menu', $nav_bar_menu);
        $this->display('index');
    }
}